home *** CD-ROM | disk | FTP | other *** search
- /*
- * vor_io.c
- *
- * Practical Algorithms for Image Analysis
- *
- * Copyright (c) 1997, 1998, 1999 MLMSoftwareGroup, LLC
- */
-
- /*
- * VOR_IO.C
- *
- * I/O routines employed by xvor.c and associated modules
- * (adapted from S. Fortune's orig. module output.c)
- *
- */
- #include <stdio.h>
- #include "xah.h"
-
- /*
- * write .vin file (->Voronoi diagram)
- * (adapted from S. Fortune's orig. routine out_bisector())
- */
- void
- write_vin_file (FILE * file, int n, int xmin, int ymin, int xmax, int ymax, struct bubble *Cxy)
- {
- int i;
-
-
- fprintf (file, "%d %f %f %f %f\n",
- n, (float) xmin, (float) xmax, (float) ymin, (float) ymax);
-
- for (i = 0; i < n; i++)
- fprintf (file, "%f %f\n", (float) ((Cxy + i)->ctr.x - xmin), (float) ((Cxy + i)->ctr.y - ymin));
-
- }
-